-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/lw 11530 txbuild drep retirement should prevent withdraw rewards #1538
Feat/lw 11530 txbuild drep retirement should prevent withdraw rewards #1538
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just some questions below and commit format issues
Also, if previous commit e2e tests fail without 45eea8b then best to squash the 2
packages/e2e/test/wallet_epoch_3/PersonalWallet/drepRetirement.test.ts
Outdated
Show resolved
Hide resolved
DrepStatusTracker fetches DrepInfo from a DrepProvider. delegation.rewardAccounts$ drepDelegatee contains the associated DRepInfo. DrepStatusTracker refreshes the DRep info in two scenarios: 1. Voting delegations or stake deregistrations are found in transaction history. 2. Transaction builder is used to either build().inspect() or build().sign(). Refetch at this point is done to ensure the tx builder is working with up-to-date information BREAKING CHANGE: DRepDelegatee type has changed to include DrepInfo - createRewardsAccountTracker now requires a drepInfo$ dependency. - BaseWallet requires a DrepProvider as a dependency
a967ff7
to
6362d83
Compare
Context
TransactionBuilder now excludes withdrawals from rewardAccounts which are vote delegated to retired DReps.
Proposed solution
Integrate DRepProvider in ObservableWallet.
delegation.rewardAccounts$
drepDelegatee
now contains DRepInfo.dRepDelegatee from
delegation.rewardAccounts$
is not always up-to-date.It is refreshed when either the DReps currently delegated to change (usually detected while inspecting the transaction history), or when a TxBuilder created with
createTxBuilder()
is used tobuild()
and eitherinspect()
orsign()
a transaction.Important Changes Introduced